<%--
  Created by IntelliJ IDEA.
  User: MI
  Date: 2021/10/14
  Time: 10:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>登录</title>
    <script src="static/js/jquery.js"></script>
    <script>
        $(function () {
            $("#aform").submit(function (e) {
                e.preventDefault();//阻止默认提交方式
                $.post("alogin.do", $(this).serialize(), function (data) {
                    //alert(data.name);
                    location.href = "fenye.jsp";
                }, "json");
            });
        })
    </script>
</head>
<body>
    <form action="" id="aform">
        姓名<input type="text" name="name"/>
        <input type="submit" value="提交"/>
    </form>
</body>
</html>
